package java9_1;

/**
 * @author oldliu
 * @since 1.0
 */
public class Fish implements Swimming {
    private String type;
    private String name;

    public Fish(String type, String name) {
        this.type = type;
        this.name = name;
    }

    @Override
    public void swim() {
        System.out.println("小鱼"+name+"在水中自由自在的游动！");
    }

    @Override
    public String toString() {
        return "这是一条🐟，类别是"+type+",名叫"+name;
    }
}
